<div data-role="dialog" id="dialog">
  <div data-role="header">
    <h1>Start Conversation</h1>
  </div>
  <div data-role="content" id="text">
    
    <?php
        $agents = json_decode($_POST["agents"]);
        if (count($agents) > 0 ) {
            print("These people are within your range to talk to:<br>");
            foreach($agents as $agent) {
                echo '<a href="conversation.php?name='.$agent.'" data-role="button" data-theme="c">'.$agent.'</a>';
            }
        } else {
            echo 'No one is within your talking range';
        }
    ?>
  </div>
</div>

